<template>
  <div>
    <table align="center">
      <tr>
        <td v-for="i in list" width="300px">
          {{ i.username }}的店
          <table align="center">
            <tr>
              <td>商品名称</td>
              <td>商品价格</td>
              <td>商品图片</td>
            </tr>
            <tr v-for="j in from" v-if="j.kid.id==i.id">
              <td>{{ j.name }}</td>
              <td>{{j.price}}</td>
              <td>
                <img :src="'http://127.0.0.1:8000'+j.pic" width="100px">
              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
  </div>
</template>

<script>
export default {
  name: "show_18",
  data() {
    return {
      from: [],
      list: []
    }
  },
  methods: {
    show() {
      this.$axios.get('users/show/').then(res => {
        if (res.data.code == 200) {
          this.from = res.data.matter
          console.log(res.data.matter)
        }
      })
    },
    show_keeper() {
      this.$axios.get('users/login/').then(res => {
        if (res.data.code == 200) {
          this.list = res.data.matter
          console.log(res.data.matter)
        }
      })
    }
  },
  mounted() {
    this.show()
    this.show_keeper()
  }
}
</script>

<style scoped>

</style>